import request from '@/utils/request'
import API from './contants.js'

export const getData = (page = 1) => request({
  url: API.TABS_API + '&page=' + page + '&platfromSource=wap',
})

export const getSuv = (page = 1) => request({
  url: API.SUV_API + '&page=' + page + '&platfromSource=wap',
})

export const getBusiness = (page = 1) => request({
  url: API.SUV_API + '&page=' + page + '&platfromSource=wap',
})

export const getBaby = (page = 1) => request({
  url: API.BABY_API + '&page=' + page + '&platfromSource=wap',
})

export const getA = (pageNumber = 2) => {
  // if (pageNumber === 0) {
  //   return Promise.resolve({ list: [] })
  // } else {
  //   return request({
  //     url: API.HOME_HOT_API + '&pageNumber=' + pageNumber + '&deviceId=c1bea068-b747-4dbe-be32-4d454f2fd428&guazi_city=45&platfromSource=wap',
  //   })
  // }
  return request({
    url: API.HOME_HOT_API + '&pageNumber=' + pageNumber + '&deviceId=c1bea068-b747-4dbe-be32-4d454f2fd428&guazi_city=45&platfromSource=wap',
  })
}

export const getBM = () => request({
  url: API.TXT_API,
})

export const getMore = (page = 1) => request({
  url: API.MORE_API + '&page=' + page + '&platfromSource=wap',
})

export const getbmw = (page = 1) => request({
  url: API.BMW_API + '&page=' + page + '&platfromSource=wap',
})
export const getyxhaoche = (page = 1) => request({
  url: API.ZIYING_API + '&page=' + page + '&platfromSource=wap',
})
export const getNewCat = (page = 1) => request({
  url: API.NEWCAT_API + '&page=' + page + '&platfromSource=wap',
})
export const getseconddied = (page = 1) => request({
  url: API.SECONDDIED_API + '&page=' + page + '&platfromSource=wap',
})
export const getbaoy = (page = 1) => request({
  url: API.BAOY_API + '&page=' + page + '&platfromSource=wap',
})
export const getaodi = (page = 1) => request({
  url: API.AODI_API + '&page=' + page + '&platfromSource=wap',
})
export const getbt = (page = 1) => request({
  url: API.BT_API + '&page=' + page + '&platfromSource=wap',
})
export const getdz = (page = 1) => request({
  url: API.DZ_API + '&page=' + page + '&platfromSource=wap',
})
export const getbc = (page = 1) => request({
  url: API.BC_API + '&page=' + page + '&platfromSource=wap',
})

export const getFourW = (page = 1) => request({
  url: API.FOUR_API + '&page=' + page + '&platfromSource=wap',
})

export const getEightW = (page = 1) => request({
  url: API.EIGHT_API + '&page=' + page + '&platfromSource=wap',
})

export const getFifteenW = (page = 1) => request({
  url: API.FIFTEEN_API + '&page=' + page + '&platfromSource=wap',
})

export const getTwentyW = (page = 1) => request({
  url: API.TWENTY_FIVE_API + '&page=' + page + '&platfromSource=wap',
})
